USE [Weval test]
GO

/****** Object:  StoredProcedure [dbo].[YearsTaught]    Script Date: 7/8/2013 7:23:18 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




ALTER PROCEDURE [dbo].[YearsTaught] @InstructorID int
AS

--DECLARE @instructorID int = 886655283


	SELECT DISTINCT
		ST.instructorID,
		semester,
		Year
		--SELECT * 
	FROM SectionsTaught ST 
		INNER JOIN CourseSections CS ON CS.ID = ST.sectionID
			AND ST.instructorID = @InstructorID
	ORDER BY year
GO